fn main() {
    let mut counter:i32 = 0;
    
    let mut result:i32= loop{
        counter +=1;

        if counter ==10{
            break counter;
        }
        println!("{}",counter);
    };
    println!("{}",result);

    while result!=0{
        println!("{}",result);
        result-=1;
    }

    println!("liftoff");


    let a = [10,20,30,40,50];
    for element in a {                      //element直接取 值
        println!("the value is {}",element);
    }

    let b = [10,20,30,40,50];
    for element in a.iter() {              //element直接取 地址
        println!("the value is {}",element);
    }

    for number in (1..10).rev(){
        println!("{}",number);
    }

    println!("liftoff");
}
